import  requests

r = requests.get("https://api.seniverse.com/v3/weather/now.json?key=Sh-LsrOsCyo4vp8Tp&location=beijing&language=zh-Hans&unit=c")
print(r.text)
# 将结果转成字典，根据key，将  "text"  "temperature" 对应的value打印下来。
r = r.json()
print("=======1========")
print(r["results"])
print("=======2========")
print(r["results"][0]['now'])
print("=======3========")
print(r["results"][0]['now']['text'])
print("=======4========")
print(r["results"][0]['now']['temperature'])



